(function(){if(!window["BX"]||window["BX"]["MPLForm"]||!window["app"])return;var t=window["BX"];var e={entityId:0,text:"",form:{},list:{},comments:{}};function i(i){e.text=t.type.isNotEmptyString(i)?i:"";if(t["localStorage"]&&e.entityId){var n=t.localStorage.get("main.post.list/text");n=n||{};if(t.type.isNotEmptyString(e.text)){n[e.entityId]=e.text}else{delete n[e.entityId]}t.localStorage.set("main.post.list/text",n)}}function n(e){var i="";if(t["localStorage"]&&e){var n=t.localStorage.get("main.post.list/text");if(n){i=n[e]||"";delete n[e];t.localStorage.set("main.post.list/text",n)}}return i}t.addCustomEvent(window,"OnUCFormSubmit",(function(){i("")}));t.addCustomEvent("main.post.form/text",(function(e){e=t.type.isArray(e)?e[0]:e;i(e)}));var o={keyBoardIsShown:false,mention:{}};window.app.exec("enableCaptureKeyboard",true);t.addCustomEvent("onKeyboardWillShow",(function(){o.keyBoardIsShown=true}));t.addCustomEvent("onKeyboardDidHide",(function(){o.keyBoardIsShown=false}));function s(e,i,n){if(t.type.isPlainObject(n)){for(var o in n){if(n.hasOwnProperty(o)){s(e,i+"["+o+"]",n[o])}}}else if(t.type.isArray(n)){for(var r=0;r<n.length;r++){s(e,i+"[]",n[r])}}else{e.append(i,!!n?n:"")}}var r=function(t,e,i){this.id=t;this.text=e||"";this.attachments=i||[];this.node=null;this.mentions={}};r.prototype={getText:function(){return this.text}};r.getInstance=function(i,n,o){var s;if(t.type.isArray(i)&&e["comments"][i.join("-")]){s=e["comments"][i.join("-")]}else if(t.type.isArray(i)){s=new r(i,n,o);s.savedInRepoId=i.join("-");e["comments"][i.join("-")]=s}else if(t.type.isObject(i)&&t.type.isNotEmptyString(i["savedInRepoId"])&&e["comments"][i["savedInRepoId"]]){s=i}return s};r.removeInstance=function(t){if(t&&t["savedInRepoId"]){delete e["comments"][t["savedInRepoId"]]}};var a=function(i){this.bindEvents();e["form"][this.handlerId]=this;this.entitiesId={};this.comment=null;this.handlerId=i;this.handler=null;this.handlerEvents={onMPFUserIsWriting:t.delegate(this.writing,this),onMPFHasBeenDestroyed:t.delegate(this.reboot,this)};this.visible=false;this.bindHandler=t.delegate(this.bindHandler,this);t.addCustomEvent(window,"onMPFIsInitialized",this.bindHandler);if(t["MPF"])this.bindHandler(t["MPF"].getInstance(this.handlerId));this.jsCommentId=t.util.getRandomString(20)};a.prototype={bindHandler:function(e){if(e&&e.id==this.handlerId){this.handler=e;t.removeCustomEvent(window,"onMPFIsInitialized",this.bindHandler);for(var i in this.handlerEvents){if(this.handlerEvents.hasOwnProperty(i)){t.addCustomEvent(this.handler,i,this.handlerEvents[i])}}this.closeWait();t.onCustomEvent(this,"OnUCFormInit",[this])}},bindEvents:function(){this.windowEvents={OnUCReply:function(t,e,i){if(this.entitiesId[t]){var n=[t,0];e=parseInt(e);if(e>0&&i){n=this.initComment(n,"",false);n.mentions[i]="[USER="+e+"]"+i+"[/USER]";var o=this.handler&&this.handler.simpleForm?this.handler.simpleForm.writingParams["~text"]:n.text;n.text=o+(o==""?"":" ")+"[USER="+e+"]"+i+"[/USER]"+", "}this.show(n,n.text,false)}}.bind(this),OnUCAfterRecordEdit:t.delegate((function(e,i,n,o){if(this.entitiesId[e]){if(o==="EDIT"){this.show([e,i],n["messageBBCode"],n["messageFields"])}else if(o==="MODERATE"){t.onCustomEvent(window,"OnUCAfterRecordAdd",[n.messageId[0],n,{node:t("record-"+n.messageId[0]+"-"+n.messageId[1])}])}else if(n["errorMessage"]){this.showError([e,i],n["errorMessage"])}else if(n["okMessage"]){this.showNote([e,i],n["okMessage"])}}}),this),OnUploadQueueError:function(t){if(!e["list"][t.entityId]){return}var i=e["list"][t.entityId].getCommentNode(document.getElementById(t.commentData.commentNodeId).getAttribute("bx-mpl-entity-id"));if(i){this.showError({node:i,attachments:[{fieldValue:"do not bind click"}]},t.errorText)}}.bind(this)};t.addCustomEvent(window,"OnUCReply",this.windowEvents.OnUCReply);t.addCustomEvent(window,"OnUCAfterRecordEdit",this.windowEvents.OnUCAfterRecordEdit);t.addCustomEvent(window,"OnUploadQueueError",this.windowEvents.OnUploadQueueError)},reboot:function(e,i,n){for(var o in this.handlerEvents){if(this.handlerEvents.hasOwnProperty(o)){t.removeCustomEvent(this.handler,o,this.handlerEvents[o])}}this.bindHandler(n)},linkEntity:function(i,o){if(this.handler===null){this._linkEntity=t.delegate((function(){this.linkEntity(i,o)}),this);t.addCustomEvent(this,"OnUCFormInit",this._linkEntity)}else{if(this["_linkEntity"])t.removeCustomEvent(this,"OnUCFormInit",this["_linkEntity"]);this.entitiesId[i]=o;e.entityId=i;var s=function(t){this.comment=this.reinitComment({id:[i,0],text:t});this.comment.text=t;this.handler.init(this.comment)}.bind(this);s(n(i))}},writing:function(e){t.onCustomEvent(window,"OnUCUserIsWriting",[e["id"][0],e["id"][1],this.jsCommentId])},reinitComment:function(t){var e=[t["id"][0],0],i=t["text"]||"";r.removeInstance(t);return this.initComment(e,i,[])},initComment:function(e,i,n){var o=r.getInstance(e,i,n);if(o["bound"]!=="Y"){t.addCustomEvent(o,"onCancel",this.submitClear.bind(this));t.addCustomEvent(o,"onStart",this.submitStart.bind(this));t.addCustomEvent(o,"onSubmit",this.submit.bind(this));t.addCustomEvent(o,"onError",function(t,e){this.showError(o,e);this.submitClear(o)}.bind(this));o["bound"]="Y"}return o},show:function(i,n,o){this.comment=this.initComment(i,n,o);this.jsCommentId=t.util.getRandomString(20);t.onCustomEvent(this.handler,"OnUCFormBeforeShow",[this,n,o]);e.entityId=i[0];this.handler.show(this.comment,!!o);t.onCustomEvent(this.handler,"OnUCFormAfterShow",[this,n,o]);return true},submitClear:function(i){r.removeInstance(i);this.jsCommentId=t.util.getRandomString(20);if(this.comment==i){this.comment=this.initComment([i.id[0],0],"",[]);e.entityId=i.id[0];this.handler.init(this.comment,{clear:true})}},submitStart:function(e,i,n){t.onCustomEvent(window,"OnUCFormBeforeSubmit",[e.id[0],e.id[1],e,this,i,n])},submit:function(i){var n=i.getText(),o=i.attachments,r=this.entitiesId[i.id[0]],a=this.handler.getForm({ENTITY_XML_ID:i.id[0],REVIEW_TEXT:n,NOREDIRECT:"Y",MODE:"RECORD",AJAX_POST:"Y",id:i.id,sessid:t.bitrix_sessid(),SITE_ID:t.message("SITE_ID"),LANGUAGE_ID:t.message("LANGUAGE_ID")}),d=new window.MobileAjaxWrapper,m=new window.FormData,l;if(i.id[1]>0){a["REVIEW_ACTION"]="EDIT";a["FILTER"]={ID:i.id[1]};a["ACTION"]="EDIT";a["ID"]=i.id[1];if(a["act"]){a["act"]="edit";a["edit_id"]=i.id[1]}}if(r["fields"]){for(l in r["fields"]){if(r["fields"].hasOwnProperty(l)){a[l]=r["fields"][l]}}}t.onCustomEvent(window,"OnUCFormSubmit",[i.id[0],i.id[1],this,a]);for(l in a){if(a.hasOwnProperty(l)){s(m,l,a[l])}}if(o){for(var h=0;h<o.length;h++){s(m,o[h]["fieldName"],o[h]["fieldValue"])}}var u=r["url"];u=t.util.add_url_param(u,{b24statAction:i.id[1]>0?"editComment":"addComment",b24statContext:"mobile"});d.Wrap({method:"POST",url:u,data:{},formData:m,type:"json",processData:true,start:false,preparePost:false,callback:t.proxy((function(n){t.onCustomEvent(window,"OnUCFormResponse",[i.id[0],i.id[1],this,n,i]);if(n["errorMessage"]){this.showError(i,n["errorMessage"])}else if(n["warningCode"]&&n["warningCode"]==="COMMENT_DUPLICATED"){var o=e["list"][n.messageId[0]].getCommentNode(n.messageId[1]);if(o){this.showError(i,n["warningMessage"])}else{t.onCustomEvent(window,"OnUCAfterRecordAdd",[i.id[0],n,i])}}else{t.onCustomEvent(window,"OnUCAfterRecordAdd",[i.id[0],n,i])}}),this),callback_failure:t.delegate((function(e){this.showError(i,t.message("INCORRECT_SERVER_RESPONSE_2"));t.onCustomEvent(window,"OnUCFormResponse",[i.id[0],i.id[1],this,e,i])}),this)});d.xhr.send(m);this.submitClear(i)},showError:function(e,i){if(t.type.isArray(e))e=this.initComment(e,"",[]);if(e&&e.node){e.node.classList.add("feed-com-block-cover-undelivered");var n=e.node.querySelector(".post-comment-error-text");if(n){n.innerHTML=i}var o=typeof e.attachments=="undefined"||e.attachments.length<=0;if(!o&&t.type.isArray(e.attachments)){o=true;for(var s=0;s<e.attachments.length;s++){if(t.type.isNotEmptyString(e.attachments[s].fieldValue)||t.type.isNotEmptyString(e.attachments[s].url)){o=false;break}}}if(o){t.bind(e.node,"click",t.proxy((function(i){t.unbindAll(e.node);e.node.classList.remove("feed-com-block-cover-undelivered");this.handler.comment=e;this.handler.simpleForm.handleAppData(e.text,true)}),this))}}},showNote:function(t,e){},showWait:function(){this.handler.hide();this.handler.showWait()},closeWait:function(){this.handler.closeWait()}};a.link=function(t,i){var n=i["id"];e["form"][n]=e["form"][n]||new a(n);e["form"][n].linkEntity(t,i)};window.mobileShowActions=function(e,i,n){n=n||window.event;var s=window.app.enableInVersion(14)&&window.platform=="ios"?window.BXMobileAppContext.isKeyboardShown():o.keyBoardIsShown;if(s){return true}if(n&&n.target&&n.target.tagName&&(n.target.tagName.toUpperCase()==="A"||n.target.tagName.toUpperCase()==="VIDEO"||n.target.tagName.toUpperCase()==="IMG"&&t.type.isNotEmptyString(n.target.getAttribute("data-bx-image")))){return true}t.eventCancelBubble(n);n.preventDefault();var r=t(["record",e,i].join("-")),a=[],d;t.MPL.addMenuItems(a,r,e,i);if(a.length>0){d=new window.BXMobileApp.UI.ActionSheet({buttons:a},"commentSheet");d.show()}return false};window.mobileReply=function(i,n){t.eventCancelBubble(n);n.preventDefault();e["list"][i].reply(n.target);return false};window.mobileExpand=function(e,i){t.eventCancelBubble(i);i.preventDefault();var n=t(e)?t.findChild(e.previousSibling,{className:"post-comment-text"},true):null;if(t(n)){var o=n.parentNode,s=200,r=parseInt(n.offsetHeight),a={height:s},d={height:r};t.remove(e);var m=(r-s)/(2e3-s);m=m<.3?.3:m>.8?.8:m;o.style.maxHeight=a.height+"px";o.style.overflow="hidden";new t["easing"]({duration:m*1e3,start:a,finish:d,transition:t.easing.makeEaseOut(t.easing.transitions.quart),step:function(t){o.style.maxHeight=t.height+"px";o.style.opacity=t.opacity/100},complete:function(){o.style.cssText="";o.style.maxHeight="none";t.onCustomEvent(window,"OnUCRecordWasExpanded",[o]);t.LazyLoad.showImages(true)}}).animate()}return false};window.mobileIOSVersion=function(){if(/iP(hone|od|ad)/.test(navigator.platform)){var t=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);return[parseInt(t[1],10),parseInt(t[2],10),parseInt(t[3]||0,10)]}else{return false}};var d=function(){t.MPL=function(i,n,o){t.MPL.superclass.constructor.apply(this,arguments);this.thumb=t.message("MPL_RECORD_THUMB");this.scope="mobile";t.removeCustomEvent(window,"OnUCFormBeforeShow",this.windowEvents["OnUCFormBeforeShow"]);t.removeCustomEvent(window,"OnUCFormAfterShow",this.windowEvents["OnUCFormAfterShow"]);t.removeCustomEvent(window,"OnUCFormAfterHide",this.windowEvents["OnUCFormAfterHide"]);t.removeCustomEvent(window,"OnUCFormBeforeHide",this.windowEvents["OnUCFormBeforeHide"]);this.windowEvents["OnUCFormBeforeSubmit"]=function(e,i,n,o,s,r){if(this.ENTITY_XML_ID===e){this.makeThumb([e,i>0?i:t.util.getRandomString(6)],n,s,r)}}.bind(this);t.addCustomEvent(window,"OnUCFormBeforeSubmit",this.windowEvents["OnUCFormBeforeSubmit"]);t.removeCustomEvent(window,"OnUCFormResponse",this.windowEvents["OnUCFormResponse"]);this.windowEvents["OnUCFormResponse"]=t.delegate((function(t,e,i,n,o){if(this.ENTITY_XML_ID===t){this.clearThumb(o)}}),this);t.addCustomEvent(window,"OnUCFormResponse",this.windowEvents["OnUCFormResponse"]);t.removeCustomEvent(window,"OnUCAfterRecordAdd",this.windowEvents["OnUCAfterRecordAdd"]);this.windowEvents["OnUCAfterRecordAdd"]=function(e,i,n){if(this.ENTITY_XML_ID===e){if(n&&t(n.node)){n["node"].setAttribute("id","record-"+i["messageId"].join("-")+"-cover")}this.add(i["messageId"],i,true,"simple")}}.bind(this);t.addCustomEvent(window,"OnUCAfterRecordAdd",this.windowEvents["OnUCAfterRecordAdd"]);if(n["SHOW_POST_FORM"]=="Y"){a.link(this.ENTITY_XML_ID,o)}e["list"][this.ENTITY_XML_ID]=this;return this};t.extend(t.MPL,window["FCList"]);t.MPL.prototype.init=function(){};t.MPL.prototype.url["activity"]=t.message("SITE_DIR")+"mobile/?mobile_action=comment_activity";t.MPL.prototype.makeThumb=function(e,i,n,s){var r=i.node||t("record-"+e.join("-")+"-cover");if(!r){var a=t.type.isString(n)?n:"";a=t.util.htmlspecialchars(a).replace(/\n/gi,"<br />");a=a.replace(/\001/,"").replace(/(\[\/user\])/gi,"\x01").replace(/\[user=(\d+)\]([^\001].+?)(\001)/gi,"$2").replace(/\001/,"[/user]");var d=window.fcParseTemplate({messageFields:{FULL_ID:e,POST_MESSAGE_TEXT:a,POST_TIMESTAMP:(new Date).getTime()/1e3}},{DATE_TIME_FORMAT:this.params.DATE_TIME_FORMAT,RIGHTS:this.rights},this.thumb),m;m=t.processHTML(d,false);r=t.create("DIV",{attrs:{id:"record-"+e.join("-")+"-cover",className:"feed-com-block-cover post-comment-active-progress","bx-mpl-xml-id":this.getXmlId(),"bx-mpl-entity-id":e[1],"bx-mpl-read-status":"old"},style:{opacity:0,height:0,overflow:"hidden"},html:m.HTML});this.node.newComments.appendChild(r);var l=r,h=t.pos(l),u=h.top,c=t.GetWindowInnerSize(),p=false,f=0,w=window.mobileIOSVersion();if(window.platform=="ios"&&t.type.isArray(w)){w=w[0];p=w>=11&&o.keyBoardIsShown;f=260}if(!p||u>c.innerHeight-f){window.scrollTo(0,u-f)}new t["easing"]({duration:500,start:{opacity:0,height:0},finish:{opacity:100,height:l.scrollHeight},transition:t.easing.makeEaseInOut(t.easing.transitions.quad),step:function(t){l.style.height=t.height+"px";l.style.opacity=t.opacity/100;if(!p||u+t.height>c.innerHeight-f){window.scrollTo(0,u+t.height-f)}},complete:function(){if(l.style.display!=="none"){l.style.cssText=""}}}).animate();var E=0,g=function(){E++;if(E<100){var i=t("record-"+e.join("-")+"-cover");if(i&&i.childNodes.length>0)t.ajax.processScripts(m.SCRIPT);else t.defer(g,this)()}};t.defer(g,this)()}t.addClass(r,"post-comment-active-progress");i.node=r;return r};t.MPL.prototype.clearThumb=function(e){if(e&&t(e.node)){t.removeClass(e.node,"post-comment-active-progress")}};t.MPL.prototype.add=function(e,i){t.MPL.superclass.add.apply(this,[e,i]);if(window["BitrixMobile"]&&window["BitrixMobile"]["LazyLoad"])setTimeout((function(){window.BitrixMobile.LazyLoad.showImages()}),500)};t.MPL.prototype.markCommentAsRead=function(e){if(!this.unreadComments.has(e)){return}var i=this.unreadComments.get(e);var n=t.findChild(i,{attrs:{id:["record",this.getXmlId(),e].join("-")}},true,false);if(n){t.removeClass(n,"post-comment-block-new");t.addClass(n,"post-comment-block-old")}t.MPL.superclass.markCommentAsRead.apply(this,[e])};t.MPL.prototype.sendPagenavigation=function(){if(t(this.node.navigation)){var e=this.node.navigationLoader;if(e){t.adjust(this.node.navigationLoader,{style:{display:"flex"}})}}t.MPL.superclass.sendPagenavigation.apply(this,arguments)};t.MPL.prototype.buildPagenavigation=function(){if(window["BitrixMobile"]&&window["BitrixMobile"]["LazyLoad"])setTimeout((function(){window.BitrixMobile.LazyLoad.showImages()}),1e3);t.MPL.superclass.buildPagenavigation.apply(this,arguments)};t.MPL.prototype.completePagenavigation=function(){t.MPL.superclass.completePagenavigation.apply(this,arguments)};t.MPL.prototype.showWait=function(e){var i=t("record-"+this.ENTITY_XML_ID+"-"+e+"-cover");if(e>0&&i)t.addClass(i,"post-comment-active-progress")};t.MPL.prototype.closeWait=function(e){var i=t("record-"+this.ENTITY_XML_ID+"-"+e+"-cover");if(e>0&&i)t.removeClass(i,"post-comment-active-progress")};t.MPL.prototype.showError=function(t,e){};t.MPL.createInstance=function(e,i,n){return new t.MPL(e,i,n)};t.MPL.getInstance=function(t){return e["list"][t]};t.MPL.addMenuItems=function(i,n,o,s){if(!t.type.isArray(i)||!t.type.isDomNode(n)){return}if(n.getAttribute("bx-mpl-menu-show")=="N"){return}if(n.getAttribute("bx-mpl-reply-show")=="Y"){i.push({title:t.message("BLOG_C_REPLY"),callback:function(){e["list"][o].reply(t(["record",o,s,"reply-action"].join("-")))}})}var r;if(n.getAttribute("bx-mpl-vote-id")!="#VOTE_ID#"&&window["RatingLikeComments"]&&(r=window.RatingLikeComments.getById(n.getAttribute("bx-mpl-vote-id")))&&r){r["__delegatedVoteFunc"]=r["__delegatedVoteFunc"]||t.delegate(r.vote,r);i.push({title:r.voted?t.message("BPC_MES_VOTE2"):t.message("BPC_MES_VOTE1"),callback:r["__delegatedVoteFunc"]});i.push({title:t.message("BPC_MES_VOTE"),callback:function(){window.RatingLikeComments.List(n.getAttribute("bx-mpl-vote-id"))}})}if(n.getAttribute("bx-mpl-edit-show")=="Y"){i.push({title:t.message("BPC_MES_EDIT"),callback:function(){e["list"][o].act(n.getAttribute("bx-mpl-edit-url"),s,"EDIT")}})}if(n.getAttribute("bx-mpl-moderate-show")=="Y"){var a=n.getAttribute("bx-mpl-moderate-approved")=="hidden";i.push({title:a?t.message("BPC_MES_SHOW"):t.message("BPC_MES_HIDE"),callback:function(){var i=n.getAttribute("bx-mpl-moderate-url").replace("#action#",a?"show":"hide").replace("#ACTION#",a?"SHOW":"HIDE");if(t.type.isNotEmptyString(i)){i=t.util.add_url_param(i,{b24statAction:a?"showComment":"hideComment",b24statContext:"mobile"})}e["list"][o].act(i,s,a?"SHOW":"HIDE")}})}if(n.getAttribute("bx-mpl-delete-show")=="Y"){i.push({title:t.message("BPC_MES_DELETE"),callback:function(){e["list"][o].act(n.getAttribute("bx-mpl-delete-url"),s,"DELETE")}})}var d=n.getAttribute("bx-mpl-comment-entity-type"),m=n.getAttribute("bx-mpl-post-entity-type");if(n.getAttribute("bx-mpl-createtask-show")=="Y"&&typeof oMSL!="undefined"){i.push({title:t.message("BPC_MES_CREATETASK"),callback:function(){oMSL.createTask({postEntityType:t.type.isNotEmptyString(m)?m:"BLOG_POST",entityType:t.type.isNotEmptyString(d)?d:"BLOG_COMMENT",entityId:s})}})}if(typeof oMSL!="undefined"&&t.type.isFunction(oMSL.copyLink)){i.push({title:t.message("BPC_MES_COPYLINK"),callback:function(){oMSL.copyLink({postEntityType:t.type.isNotEmptyString(m)?m:"BLOG_POST",entityType:t.type.isNotEmptyString(d)?d:"BLOG_COMMENT",entityId:s})}})}if(n.getAttribute("bx-mpl-edit-show")=="Y"&&t.Tasks&&t.Tasks.ResultAction&&o.indexOf("TASK_")===0&&t.Tasks.ResultAction.getInstance().canCreateResult(+/\d+/.exec(o))){var l=+/\d+/.exec(o);var h=t.Tasks.ResultManager.getInstance().getResult(l);if(h&&h.context==="task"&&h.canSetAsResult&&h.canSetAsResult(s)){i.push({title:t.message("BPC_MES_RESULT_V2"),callback:function(){t.Tasks.ResultAction.getInstance().createFromComment(s)}})}}};t.MPL.getMenuItems=function(e){var i=e.getData(),n=i.menuItems,s=i.targetNode,r=window.app.enableInVersion(14)&&window.platform=="ios"?window.BXMobileAppContext.isKeyboardShown():o.keyBoardIsShown;if(r){return}if(!t.type.isDomNode(s)||!t.type.isArray(n)){return}if(s.tagName&&(s.tagName.toUpperCase()=="A"||s.tagName.toUpperCase()=="IMG"&&t.type.isNotEmptyString(s.getAttribute("data-bx-image")))){return}var a=s.classList.contains("post-comment-block")?s:t.findParent(s,{className:"post-comment-block"});if(!a){return}var d=a.getAttribute("bx-mpl-entity-xml-id"),m=parseInt(a.getAttribute("bx-mpl-comment-id"));if(!t.type.isNotEmptyString(d)||m<=0){return}t.MPL.addMenuItems(n,a,d,m)};t.Event.EventEmitter.subscribe("BX.MPL:onGetMenuItems",t.MPL.getMenuItems);t.addCustomEvent(window,"OnUCHasBeenDestroyed",(function(t){delete e["list"][t]}));t.onCustomEvent("main.post.list/mobile",["script.js"]);t.removeCustomEvent("main.post.list/default",d)};t.addCustomEvent("main.post.list/default",d);if(window["FCList"])d();BXMobileApp.addCustomEvent(window,"onPull-unicomments",(function(i){var n=i.params;var o=i.command;if(n["AUX"]&&!t.util.in_array(n["AUX"],["createtask","fileversion","TASKINFO"])||e["list"][n["ENTITY_XML_ID"]]<=0){return}if(o==="comment_mobile"){if(n["NEED_REQUEST"]==="Y"){}else if(n["ACTION"]==="DELETE"){t.onCustomEvent(window,"OnUCommentWasDeleted",[n["ENTITY_XML_ID"],[n["ENTITY_XML_ID"],n["ID"]],n]);t.onCustomEvent(window,"OnUCFeedChanged",[n["ID"]])}else if(n["ACTION"]==="HIDE"){t.onCustomEvent(window,"OnUCommentWasHidden",[n["ENTITY_XML_ID"],[n["ENTITY_XML_ID"],n["ID"]],n]);t.onCustomEvent(window,"OnUCFeedChanged",[n["ID"]])}else{if(n["ACTION"]==="REPLY")n["NEW"]=!n["AUTHOR"]||n["AUTHOR"]["ID"]!=t.message("USER_ID")?"Y":"N";t.onCustomEvent(window,"OnUCCommentWasPulled",[[n["ENTITY_XML_ID"],n["ID"]],{messageFields:n},n])}}else if(o==="answer"&&Number(n["USER_ID"])!==Number(t.message("USER_ID"))){t.onCustomEvent(window,"OnUCUsersAreWriting",[n["ENTITY_XML_ID"],n["USER_ID"],n["NAME"],n["AVATAR"]])}}))})();
//# sourceMappingURL=script.map.js